﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TH_DANH_SACH_SACH.ascx.cs" Inherits="The_hien_TH_DANH_SACH_SACH" %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager"%>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
	
<div>
    <div>
    <asp:Panel ID="PanelTonTai" runat="server" Width="580px">
        <div align="right" style="background-image: url('../Hinh/button.png');">
            <span style="color: #FFFFFF;"><strong>Số sách mỗi trang</strong></span>
            <asp:DropDownList ID="DropDownListSoSach" runat="server" 
                onselectedindexchanged="DropDownListSoSach_SelectedIndexChanged" 
                ViewStateMode="Enabled" AutoPostBack="True" 
                ontextchanged="DropDownListSoSach_SelectedIndexChanged">
                <asp:ListItem>6</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
            </asp:DropDownList>
        </div>
        <asp:DataList ID="DataListSach" runat="server" RepeatColumns="2" 
            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="0px" CellPadding="0" 
            ForeColor="Black" GridLines="Horizontal" Width="580px" 
            ViewStateMode="Enabled" DataKeyField="idSach" 
            onitemcommand="DataListSach_ItemCommand" 
            onselectedindexchanged="DataListSach_SelectedIndexChanged">
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        <ItemTemplate>
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td rowspan="2" valign="top" width="80px">
                    <a href='<%# "../Trang_web/Trang_chi_tiet.aspx?id="+Eval("idSach") %>'>
                        <asp:Image ID="Image_sach" runat="server" Height="100px" 
                            ImageUrl='<%# "~/MyPhoto.ashx?ID=" + Eval("idSach") %>' ToolTip='<%# Eval("tenSach") %>' Width="80px" />
                    </a>
                    </td>
                    <td valign="top" align="left">
                        <strong>
                        <asp:Label ID="Ma_sach" runat="server" 
                            style="color:Blue; font-size: medium" Text='<%# Eval("maSach") %>'></asp:Label>
                        <br />
                        <asp:Label ID="Ten_sach" runat="server" 
                            style="color: #003300; font-size: medium" Text='<%# Eval("tenSach") %>'></asp:Label>
                        </strong>
                    </td>
                </tr>
                <tr>
                    <td valign="bottom" align="left">
                        <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Overline="False" 
                            Font-Size="11pt" ForeColor="#009900" Text="Đơn giá:"></asp:Label>
                        <asp:Label ID="LabelDonGia" runat="server" Font-Bold="True" Font-Size="11pt" 
                            ForeColor="#CC3300" Text='<%# Eval("giaSach","{0:#,### VND}") %>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td valign="top" width="80px">
                        <br />
                        <asp:HyperLink ID="HyperLinkChiTiet" runat="server" 
                            ImageUrl="~/Hinh/btn_chitiet.jpg" 
                            NavigateUrl='<%# "../Trang_web/Trang_chi_tiet.aspx?id="+Eval("idSach") %>'>Chi tiết</asp:HyperLink>
                    </td>
                    <td valign="top" align="left">
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="don_gia" runat="server" Text=""
                            Visible="False"></asp:Label>
                        <asp:Label ID="idSach" runat="server" Text='<%# Eval("idSach") %>' 
                            Visible="False"></asp:Label>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <SelectedItemStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
    </asp:DataList>
    <cc1:CollectionPager ID="CollectionPager1" runat="server" FirstText="Đầu" BackText="« Trước &amp;nbsp;"
                            LabelText="" LastText="Cuối" NextText="&amp;nbsp; Sau  »" ShowFirstLast="True"
                            SliderSize="5" PagingMode="PostBack" 
            BackNextLinkSeparator="" BackNextLocation="Split"
                            PageNumbersDisplay="Numbers" ResultsLocation="None" 
            BackNextDisplay="HyperLinks" ViewStateMode="Enabled">
                    </cc1:CollectionPager>

        &nbsp;</asp:Panel>
    </div>
    <asp:Panel ID="PanelKhongTonTai" runat="server" Width="580px">
        <asp:Label ID="LabelKTT" runat="server" Text="Không có sách phù hợp yêu cầu" 
            style="font-weight: 700; font-size: x-large"></asp:Label>
    </asp:Panel>
</div>




